<template>
  <div>
    <el-image :src="src" class="img-container">
      <template #error>
        <!-- 静态资源就近维护：把head.jpg这张图放在这个组件的目录下 -->
        <img src="./head.jpg" alt="">
      </template>
    </el-image>
  </div>
</template>
<style>

</style>
<script>
export default {
  props: {
    src: {
      type: String,
      required: true
    }
  }

}
</script>

<style scoped lang="scss">
.img-container {
    border-radius: 50%;
    ::v-deep img{
    width: 100px;
    height: 100px;
  }

}
</style>>
